<div ng-include="'html/component/nav.html'" ng-controller="NavCtrl"></div>
<ul class="set_item" ng-include="'html/component/left_nav.html'" ng-controller="SettingNavCtrl"></ul>
<div class="set_box"> 
    <!--小票明细 点击列表项时弹出-->
    <h1 class="set_title"><!--未上传数据-->{{language.TIPS_SET_UNUPLOAD_DATA}}<i class="help" id="help_waitUpload" ng-click="help_prompt(language.HELP_PROMPT_WAITUPLOAD, 'help_waitUpload')"></i><span class="title_btn_group">
            <a class="title_btn" ng-show = "str_upload == true"  ng-model="str_upload" ng-click = "btn_upload();"><!--上传-->{{language.TIPS_UPLOAD}}</a> 
            <a class="title_btn" ng-click = 'refresh_data();'><!--刷新-->{{language.TIPS_SET_FLUSH}}</a>
            <a class="title_btn" ng-show = "str_upload == true"  ng-model="str_upload" ng-click = "btn_cleardata();"><!--清除数据-->{{language.TIPS_CLEARDATA}}</a> 
        </span></h1>

    <!--<a href="#add" id="btn_receipt_add" data-icon="plus" class="ui-btn ui-icon-plus ui-btn-icon-left" data-role="button" role="button" data-rel="popup" data-position-to="window" data-transition="pop" aria-haspopup="true" aria-owns="detail" aria-expanded="false">新增小票</a>--> 

    <div class="set_cont wait_upload">
        <ul class="synch_box synch_set">
            <li class="title">
                <!--同步设置-->
                {{language.TIPS_SET_SYNC_SET}}
            </li>
            <li class="synch_item">           
                <div class="name">
                    <!--是否开启同步-->
                    {{language.TIPS_SET_IS_START_SYNC}}：
                </div>
                <div class="val">
                    <p class="radio_wrap">
                        <input type="radio" name="synch_switch" id="synch_switch0" value="0" ng-model="configData.auto_load" ng-click="change_auto_load();"/>
                        <label for="synch_switch0" ng-class="{true:'curr',false:''}[configData.auto_load == 0]">{{language.TIPS_SET_YES}}</label>
                        <input type="radio" name="synch_switch" id="synch_switch1" value="1" ng-model="configData.auto_load" ng-click="change_auto_load();"/>
                        <label for="synch_switch1" ng-class="{true:'curr',false:''}[configData.auto_load == 1]">{{language.TIPS_SET_NO}}</label>
                    </p>
                </div>
            </li>
            <li class="synch_item" ng-if="configData.auto_load == 0">
                <div class="name">同步内容：</div>
                <div class="val">
                    <p class="radio_wrap">
                        <span style="margin-right:5px;">
                        <input type="checkbox" ng-model="configData.offline_receipt" id="offline_receipt" ng-click="change_auto_load();"/>
                        <label for="offline_receipt" ng-class="{true:'curr',false:''}[configData.offline_receipt]">离线小票</label>
                        </span>
                        <span style="margin-right:5px;">
                        <input type="checkbox" ng-model="configData.offline_vip" id="offline_vip" ng-click="change_auto_load();"/>
                        <label for="offline_vip" ng-class="{true:'curr',false:''}[configData.offline_vip]">离线会员</label>
                        </span>
                    </p>
                </div>
            </li>    
            <li class="synch_item" ng-if="configData.auto_load == 0">
                <div class="name">
                    <!--同步频率设定-->
                    {{language.TIPS_SET_SYNC_HZ}}：
                </div>
                <div class="val">
                    <p class="radio_wrap">
                        <input type="radio" name="synch_frequency" id="synch_frequency1" value="1800000" ng-model="configData.load_frequency" ng-click="change_auto_load();"/>
                        <label for="synch_frequency1" ng-class="{true:'curr',false:''}[configData.load_frequency == 1800000]">30{{language.TIPS_SET_MIN}}</label>
                        <input type="radio" name="synch_frequency" id="synch_frequency2" value="3600000" ng-model="configData.load_frequency" ng-click="change_auto_load();"/>
                        <label for="synch_frequency2" ng-class="{true:'curr',false:''}[configData.load_frequency == 3600000]">1{{language.TIPS_SET_HOUR}}</label>
                        <input type="radio" name="synch_frequency" id="synch_frequency3" value="21600000" ng-model="configData.load_frequency" ng-click="change_auto_load();"/>
                        <label for="synch_frequency3" ng-class="{true:'curr',false:''}[configData.load_frequency == 21600000]">6<!--小时-->{{language.TIPS_SET_HOUR}}</label>
                        <input type="radio" name="synch_frequency" id="synch_frequency4" value="43200000" ng-model="configData.load_frequency" ng-click="change_auto_load();"/>
                        <label for="synch_frequency4" ng-class="{true:'curr',false:''}[configData.load_frequency == 43200000]">12<!--小时-->{{language.TIPS_SET_HOUR}}</label>
                        <input type="radio" name="synch_frequency" id="synch_frequency5" value="86400000" ng-model="configData.load_frequency" ng-click="change_auto_load();"/>
                        <label for="synch_frequency5" ng-class="{true:'curr',false:''}[configData.load_frequency == 86400000]">24<!--小时-->{{language.TIPS_SET_HOUR}}</label>
                    </p>
                </div>
            </li>
        </ul>
        <div id="tabs">
            <div class="navbar">
                <ul class="navbar_ul">
                    <li><a ng-class='switch_01' ng-click = 'tab_receipt_list();' ng-model = 'record_cur' ><!--离线小票-->{{language.TIPS_SET_OFF_LINE_RECEIPT}} <span class="navbar_count">{{receipt_count}}</span></a></li>
                    <li><a ng-class='switch_02'  ng-click = 'tab_vip_list();' ng-model="vip_cur" ><!--离线会员-->{{language.TIPS_SET_OFF_LINE_VIP}}<span class="navbar_count" >{{vip_count}}</span></a></li>
                    <li><a ng-class='switch_03'  ng-click = 'tab_take_stock_record_list();' ng-model="stock_cur" ><!--离线盘点数据-->{{language.TIPS_SET_OFF_LINE_CHECK_DATA}}<span class="navbar_count" >{{stock_count}}</span></a></li>
                </ul>
            </div>
            <div ng-show="buttonRefresh == '1'">
                <div id="one" ng-show = "record_cur == '1'" class="table_wrap">
                    <table class="list_table">           
                        <tr>
                            <th><!--单据编号-->{{language.TIPS_INVENTORY_DOC_CODE}}</th>
                            <th><!--数量-->{{language.TIPS_INVENTORY_NUM}}</th>
                            <th><!--金额-->{{language.TIPS_INVENTORY_MONEY}}</th>
                            <th><!--详情-->{{language.TIPS_INVENTORY_DETAIL}}</th>
                            <th><!--状态-->{{language.TIPS_INVENTORY_STATUS}}</th>
                        </tr>            	
                        <tr ng-repeat="li in receipt_list track by $index"  >
                            <td>{{li.record_code}}</td>
                            <td>{{li.num}}</td>
                            <td>{{li.money|number:2}}</td>
                            <td class="detail">
                                <strong><!--收银员-->{{language.TIPS_CASHIER_MEN}}:</strong>{{li.trade_user_code}}
                                <strong>/<!--数量-->{{language.TIPS_CASHIER_NUM}}:</strong>{{li.num}}
                                <strong>/<!--金额-->{{language.TIPS_CASHIER_MONEY}}:</strong>{{li.money}}
                                <strong>/<!--会员-->{{language.TIPS_VIP}}:</strong>{{li.vip_code}}
                                <strong>/<!--记录时间-->{{language.TIPS_SET_WRITE_TIME}}:</strong>{{li.record_time}}
                            </td>
                            <td>{{li.comment}}</td>
                        </tr>
                    </table>
                </div>
                <div id="two" ng-show = "vip_cur == '1'" class="table_wrap">
                    <table class="list_table">
                        <tr>
                            <th><!--姓名-->{{language.TIPS_SET_NAME}}</th>
                            <th><!--卡号-->{{language.TIPS_CARD}}</th>
                            <th><!--加入时间-->{{language.TIPS_ADD_TIME}}</th>
                            <th><!--状态-->{{language.TIPS_SET_STATUS}}</th>
                        </tr>
                        <tr ng-repeat="li in vip_list track by $index"  >
                            <td>{{li.customer_name}}</td>
                            <td>{{li.customer_code}}</td>
                            <td>{{li.is_add_time}}</td>
                            <td>{{li.comment}}</td>
                        </tr>
                    </table>
                </div>
                <div id="three" ng-show = "stock_cur == '1'" class="table_wrap">
                    <table class="list_table">
                        <tr>
                            <th><!--单据编号-->{{language.TIPS_INVENTORY_DOC_CODE}}</th>
                            <th><!--数量-->{{language.TIPS_INVENTORY_NUM}}</th>
                            <th><!--金额-->{{language.TIPS_INVENTORY_MONEY}}</th>
                            <th><!--时间-->{{language.TIPS_INVENTORY_TIME}}</th>
                        </tr>
                        <tr ng-repeat="li in take_stock_record_list track by $index"  >
                            <td><a ng-click = "take_stock_record_detail(li.record_code);" href="javascript:void(0)">{{li.record_code}}</a></td>
                            <td>{{li.num}}</td>
                            <td>{{li.money}}</td>
                            <td>{{li.record_time}}</td>
                        </tr>
                    </table>
                </div>
            </div>
            <!--商品展示-->
            <div class="table_wrap" ng-show="buttonRefresh == '0'" ng-swipe-right="close_detail();">
                <table class="list_table">
                    <tr>
                        <th>sku</th>
                        <th><!--名称-->{{language.TIPS_INVENTORY_NAME}}</th>
                        <th>{{language.TIPS_INVENTORY_NUM}}</th>
                        <th ng-show ="pdty">{{language.TIPS_INVENTORY_BOOK_NUMBER}}</th>
                        <th><!--单价-->{{language.TIPS_INVENTORY_UNIT_PRICE}}</th>
                        <th><!--总价-->{{language.TIPS_INVENTORY_TOTAL_PRICE}}</th>
                    </tr>
                    <tr ng-repeat="li in take_stock_record_detail_list track by $index">
                        <td>{{li.sku}}</td>
                        <td>{{li.goods_name}}</td>
                        <td>{{li.num}}</td>
                        <td ng-show ="pdty">{{li.SkuNum}}</td>
                        <td>{{li.price}}</td>
                        <td>{{li.money}}</td>
                    </tr>
                </table>        	
            </div>
            <p class="tail_btn" ng-show="buttonRefresh == '0'" ng-swipe-right="close_detail();"><button type="button" class="btn" value="{{language.TIPS_UPLOAD}}" ng-click="stock_upload(take_stock_record_detail_list);"> <!--上传-->{{language.TIPS_UPLOAD}} </button></p>
        </div>
    </div>
</div>
